package com.tuling.iface.demo02;

import java.util.function.Consumer;

/**
 * @ClassName MyFunctionalInterfaceTest
 * @Description TODO
 * @Author tant
 * @Date 2024/6/27 16:33
 */
public class MyFunctionalInterfaceTest {

    public static void main(String[] args) {
        MyFunctionalInterface02 func1 = new MyFunctionalInterface02() {
            @Override
            public void myMethod() {
                System.out.println("hello = method");
            }
        };
        func1.myMethod();

        MyFunctionalInterface02 func2 = () -> System.out.println("hello = method");
        func2.myMethod();


    }


}
